#!/bin/bash

INST_PATH=`pwd`/../install

SQLITE_VERSION=sqlite-autoconf-3410200

if [ -e $INST_PATH/lib/libsqlite3.so ] ; then
	exit ;
fi

if [ ! -e $SQLITE_VERSION.tar.gz ] ; then
	wget https://www.sqlite.org/2023/$SQLITE_VERSION.tar.gz
fi

if [ ! -d $SQLITE_VERSION ] ; then
	tar -xzf $SQLITE_VERSION.tar.gz
fi

if [ -e $INST_PATH ] ; then
	exit ;
fi

cd $SQLITE_VERSION
./configure --prefix=${INST_PATH} --enable-static

make && make install
